<form action="index.php" method="post">
	<label>Destination (Hotel Name, City)</label>
    <input type="text" name="destination" />
    <div class="line"></div>
    
	<label>Check-in</label>
    <input type="text" name="check_in" readonly="readonly" class="date" id="date_from" value="<?php echo $next_friday; ?>" />
    <div id="day_date_from"></div>
    <div>
    	<span class="night-label">Nights</span>
        <select name="night" id="night" onChange="javascript:dateRange();">
            <?php
                for($i=1; $i<=30; $i++){
                
                    $selected = '';
                    if($i == 3){
                        $selected = 'selected="selected"';
                    }
            ?>
                    <option value="<?php echo $i; ?>" <?php echo $selected;?>><?php echo $i; ?></option>
             <?php
                }
             ?>
        </select>
    </div>
    <label>Check-out</label>
    <input type="text" name="check_out" readonly="readonly" class="date" id="date_to" value="<?php echo $next_three_day; ?>" />
    <div id="day_date_to"></div>
    <div class="line"></div>
    
    <label>Guests</label>
    <?php
		$default = 1;
		
		for($r=1;$r<=4;$r++){
			$show_room = ($r <= $default? "" : 'style="display:none;"');
	?>
            <div class="guest" id="rm_<?php echo $r; ?>" <?php echo $show_room; ?>>
                <div class="room-label">Room <?php echo $r; ?>: <?php if($r != 1){ ?><span onClick="javascript:remove_room();">remove</span><?php } ?></div>
                <div class="room-details">
                    <div class="room-detail">Adults</div>
                    <div class="room-detail">Children</div>
                    <div class="clear"></div>
                    <div class="room-detail">
                        <select name="adults[]">
                            <?php
                                for($i=1; $i<=4; $i++){
                                
                                    $selected = '';
                                    if($i == 2){
                                        $selected = 'selected="selected"';
                                    }
                            ?>
                                    <option value="<?php echo $i; ?>" <?php echo $selected;?>><?php echo $i; ?></option>
                             <?php
                                }
                             ?>
                        </select>
                    </div>
                    <div class="room-detail">
                        <select name="child[]" id="child-<?php echo $r; ?>" onChange="javascript:child_age(<?php echo $r; ?>);">
                            <?php
                                for($i=0; $i<=3; $i++){
                                
                                    $selected = '';
                                    if($i == 0){
                                        $selected = 'selected="selected"';
                                    }
                            ?>
                                    <option value="<?php echo $i; ?>" <?php echo $selected;?>><?php echo $i; ?></option>
                             <?php
                                }
                             ?>
                        </select>
                    </div>
                    <div class="clear"></div>
                    <div id="age_<?php echo $r; ?>" style="display:none;">
                        <div>Age of Children</div>
                        <?php
							for($ag=1;$ag<=3;$ag++){
						?>
                            <div class="room-detail age_<?php echo $r; ?>" id="age_<?php echo $r.'_'.$ag?>">
                                <select name="age_child[]" class="age">
                                    <?php
                                        for($i=1; $i<=17; $i++){
                                        
                                            $selected = '';
                                            if($i == 6){
                                                $selected = 'selected="selected"';
                                            }
                                    ?>
                                            <option value="<?php echo $i; ?>" <?php echo $selected;?>><?php echo $i; ?></option>
                                     <?php
                                        }
                                     ?>
                                </select>
                            </div>
                        <?php
							}
						?>
                        <div class="clear"></div>
                    </div>
                </div>
            </div>
    <?php
		}
	?>
    <input type="hidden" name="rooms" id="current_room" value="<?php echo $default; ?>" />
    <div id="add_room_button"><a onClick="javascript:add_room();">Add another rooms</a></div>
    
    <div class="clear10"></div>
    <div class="button"><input type="submit" name="submit" value="Go" /></div>
</form>